package com.cuit.service.Impl;

import com.cuit.service.LogoutService;
import com.cuit.utils.RedisUtils;
import com.cuit.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author SYE
 * @date 2023/7/27 14:17
 * @desciption:
 */
@Service
public class LogoutServiceImpl implements LogoutService {

    @Autowired
    private RedisUtils redisUtils;

    @Override
    public Result logout(String token) {
        redisUtils.del(token);
        return Result.success(1);
    }
}
